# 递归实现阶乘

# num = 1
# def jc(n):
#     global num
#     if n > 0:
#         num = num*n
#         jc(n-1)


# jc(5)
# print(num)

def jiecheng(n):
    if n == 1:
        return 1
    else:
        return n*jiecheng(n-1)

print(jiecheng(4))



